@page
@{ Layout = "_LayoutHome"; }
@section Styles{
  <style>
    body {
      background: #f5f5f5;
    }
    .wrapper-page {
      margin: 7.5% auto;
      max-width: 460px;
    }
  </style>
}

<div class="wrapper-page">
  <el-card class="box-card">
    <div slot="header" class="clearfix">
      <span>重置密码</span>
    </div>
  
    <el-form v-on:submit.native.prevent ref="form" :model="form" size="medium" label-width="100px" status-icon>
      <el-form-item label="手机号码" prop="mobile" :rules="[
        { required: true, message: '请输入手机号码' },
        { validator: utils.validateMobile, message: '请输入有效的手机号码' }
      ]">
        <el-input v-model="form.mobile" placeholder="请输入手机号码"></el-input>
      </el-form-item>
      <el-form-item label="短信验证码" prop="code" :rules="[{ required: true, message: '请输入短信验证码' }]">
        <el-input v-model="form.code" autocomplete="off" placeholder="请输入短信验证码">
          <template slot="append">
            <el-link :underline="false" v-on:click.prevent="btnSendSmsClick">
              {{ countdown > 0 ? countdown + '秒': '获取验证码' }}
            </el-link>
          </template>
        </el-input>
      </el-form-item>
      <el-form-item label="新密码" prop="password" :rules="[{ required: true, message: '请输入新密码' }]">
        <el-input v-model="form.password" type="password" name="password" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="确认密码" prop="confirmPassword" :rules="[{ required: true, message: '请输入确认密码' }, { validator: validatePass }]">
        <el-input v-model="form.confirmPassword" type="password" name="confirmPassword" autocomplete="off"></el-input>
      </el-form-item>
      
      <el-divider></el-divider>
      <div style="height: 10px"></div>
      <el-form-item align="center">
        <el-button type="primary" v-on:click="btnSubmitClick">确 定</el-button>
        <el-link v-on:click="btnLoginClick" icon="el-icon-user" type="primary" :underline="false" style="margin-left: 10px">返回登录</el-link>
      </el-form-item>
  
    </el-form>
  
  </el-card>
</div>

@section Scripts{
  <script src="/sitefiles/assets/js/home/lostPassword.js" type="text/javascript"></script>
}